<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<div id="app">
	<div>
		{{message}}
	</div>

	<!--强制数据绑定-->
	<div>
		<img :src="imgUrl">
		<img v-bind:src="imgUrl">
	</div>

	<!--事件监听绑定-->
	<div>
		<button @click="test">测试</button>
		<button v-on:click="test2('test')">测试2</button>
	</div>

</div>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript">
	var vm = new Vue({
		el: "#app",
		data: {
			message: "test",
			imgUrl: "https://www.runoob.com/wp-content/uploads/2017/01/vue.png"
		},
		methods: {
			test() {
				alert('test');
			},
			test2(content) {
				alert(content);
			}
		}
	});
</script>
</body>
</html>